<template>
  <el-card>
    <div class="box">
      <img :src="userStore.userInfo.avatar" alt="" class="avatar" />
      <div class="bottom">
        <h3 class="title">
          {{ getTime() }}好呀，{{ userStore.userInfo.username }}
        </h3>
        <p class="subtitle">欢迎来到阿文的后台管理系统</p>
        
      </div>
    </div>
  </el-card>
  <div class="icon-box">
    <svg-icon name="welcome" width="500px" height="500px"></svg-icon>
  </div>
</template>

<script setup lang="ts">
// 引入用户相关仓库信息，获取头像、昵称
import useUserStore from '@/store/modules/user'
import { getTime } from '@/utlis/time'

// 获取储存用户信息的仓库对象
let userStore = useUserStore()
</script>

<style lang="scss" scoped>
.box {
  display: flex;

  .avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
  }

  .bottom {
    margin-left: 20px;

    .title {
      font-size: 25px;
      margin-bottom: 20px;
      margin-bottom: 30px;
    }

    .subtitle {
      font-style: italic;
      color: #999;
    }
  }
}

.icon-box {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}
</style>
